#ifndef TCPSERVER_H
#define TCPSERVER_H

#include <WinSock2.h>
#include <string>

/*
//===========================================================================
// Socket
//===========================================================================
class Socket
{
public :

    virtual ~Socket();
    Socket( const Socket & );
    Socket & operator = ( Socket & );

    std::string ReceiveLine();
    std::string ReceiveBytes();

    void Close();

    void SendLine( std::string );

    void SendBytes( const std::string & );

protected :

    friend class SocketServer;
    friend class SocketSelect;

    Socket( SOCKET s );
    Socket();

    SOCKET s_;

    int * refCounter_;

private :
  
    static void Start();
    static void End();
    static int  nofSockets_;
};

//===========================================================================
// SocketClient
//===========================================================================
class SocketClient
    : public Socket
{
public :
    SocketClient(
        const std::string & host,
              int           port
    );
};

//===========================================================================
// SocketServer
//===========================================================================
class SocketServer
    : public Socket
{
public :
  
    SocketServer(
        int port,
        int connections
    );

    Socket * Accept();
};

// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/wsapiref_2tiq.asp
//===========================================================================
// SocketSelect
//===========================================================================
class SocketSelect
{
public :
    
    SocketSelect(
        Socket const * const s1,
        Socket const * const s2 = NULL
    );

    bool Readable(
        Socket const * const s
    );

private:
    fd_set fds_;
}; 
*/

#endif // TCPSERVER_H